package com.sky.his.api.db.pojo;

import lombok.Data;
import javax.validation.constraints.*;

@Data
public class InsertAppointmentForm {
    @NotNull(message = "orderId不能为空")
    @Min(value = 1, message = "orderId不能小于1")
    private Integer orderId;

    @NotBlank(message = "date不能为空")
    @Pattern(regexp = "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$", message = "date格式不正确")
    private String date;

    @NotBlank(message = "name不能为空")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{2,10}$", message = "name内容不正确")
    private String name;

    @NotBlank(message = "pid不能为空")
    @Pattern(regexp = "^[0-9a-zA-Z]{18}$", message = "pid内容不正确")
    private String pid;

    @NotBlank(message = "tel不能为空")
    @Pattern(regexp = "^1[1-9]\\d{9}$", message = "tel内容不正确")
    private String tel;

    @NotBlank(message = "mailingAddress不能为空")
    @Pattern(regexp = "[0-9A-Za-z\\u4e00-\\u9fa5\\-_#]{10,100}", message = "mailingAddress内容不正确")
    private String mailingAddress;

    @Pattern(regexp = "^[0-9A-Za-z\\u4e00-\\u9fa5\\-_#]{2,100}$", message = "company内容不正确")
    private String company;
}
